Results 1 to 7 of 7

Thread: Remove Static Model/Entity from Custom map

  1. #1
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default Remove Static Model/Entity from Custom map

    Hi

    I want to be able to remove a static model ( of a tank ) thats been placed in a custom map
    Ive been searching forums but no luck , seems you can only hex edit the bsp , but that still leaves clip brushes behind.

    I thought i could try removeing the entity , but static models dont have them , or i cant find them when i have sv_showentnums 1

    Removeclass , would work but i cant seem to find the classname of the model to remove it, i tried adding a classname via its tiki file , but no luck
    Also read around that it would default to 'Object' , but it doesnt seem to

    I tried loading the map into Mohaaradiant , but everything appears to be there except the static models , ie a tank, a old car etc
    the bsp loads up in mohaatools ( by ScorpioMidget) and it lists the tank model in static entities , but you can only see the spawnflags under it , nothing else about it to try and remove it

    Question is , What would be the classname of the of the static model im trying to remove, or if you cant do it via removeclass , is there another way , or how to find its entitiy number if it has one ??

    Also can you change the spawnflags of a whole classname of entities via script, like make all WindowObjects (func_window) passable once broken ie '1' , i can change each window in the bsp and it works , just wondering if theres an easier way

    Map

    St - Renan

    C- St Renan.pk3


    Model is the tank at axis end near archway ( 185 766 -25 )

    models/static/vehicle_shermantank_dead.tik

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  2. #2
    Developer Todesengel's Avatar
    Join Date
    Dec 2013
    Location
    St. Louis, Missouri, USA
    Posts
    266

    Default

    Yes. It is a very old thread. But unanswered and I'm looking for the answer too

    In my case, the map is 'southern_france_again' (by the way, hats off to the 'again' series... awesome maps). There are others I'd like to do this to as well...

    The issue is once a window is broken, I can't jump out of it. I believe this is set in the map file, but I've got my hands full learning scripting well, and don't really want to take on mohradiant just yet

    I tried "removeclass windowobject" but that seems to have no effect. I assume I could edit each window in the bsp....

    I also could have sworn that recently someone posted about something else, and one of the replies was about just setting a cvar that makes broken windows jump-out-able... but now my googlefu fails me. Anyone know?

  3. #3
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,259

    Default

    Hi,

    This is an old thread, but unfortunately i still hadnt managed to fix my issue.

    Now yours is another problem altogether and again unfortunately, the "windows" in southern france are not actual windows, so without recompiling the bsp with mohaa radient or similar, its not going to be easy. The reason people could hex edit the other maps windows is because they were actual window objects.

    Good thing about reborn, is that we can get entities, loop through them and get all window objects, then change them so they can be jump -out-able, by just setting their spawnflags to 0.

    Something like this
    Code:
    local.min = int(getcvar(sv_maxclients))
    for(local.i = local.min;local.i <= 200;local.i++)
    {
        local.ent = getentity local.i
            
        if(local.ent != NULL)
        {
            if(typeof(local.ent) == "listener")
            {
                if(local.ent.classname == "WindowObject")
                {
                
                local.ent spawnflags 0
                }
            }
        }
        
        waitframe
    }
    Bare in mind the getentity is STILL not working on linux

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  4. #4

    Default

    might be and old thread but I just learned some cool

  5. #5

    Default

    Static models cannot be removed in-game. They are stored in a BSP lump containing all static models for performance reasons and to avoid limitations by spawning them using the entity memory : some maps can contain a large number of static models which is why it is useful to make them client-side only. They are both loaded server-side (for collision) and client-side (for rendering).

  6. #6

    Default

    To get the entity number you can use g_showdamage 1 when you shoot on the entity.

    Will print the info to the console but you need to have developer 3 on.

  7. #7

    Default

    Quote Originally Posted by Ley0k View Post
    Static models cannot be removed in-game. They are stored in a BSP lump containing all static models for performance reasons and to avoid limitations by spawning them using the entity memory : some maps can contain a large number of static models which is why it is useful to make them client-side only. They are both loaded server-side (for collision) and client-side (for rendering).
    How are those models defined as static models by the game?, is because they are inside the /static/ folder or because they start with "static_" in the Quaked specs? or something else?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •